/*
 * Node.hpp
 * Author: Elias Capito, Yanick Candaux
 * PCM
 */

#ifndef NODE_HPP_
#define NODE_HPP_

#include "BoardInfos.hpp"
#include <cstring>
using namespace std;

namespace pcm {

class Node {


public:

	static LL cons;
	BoardInfos *m_item;
	Node *m_next;

	Node(){
#ifdef CACLUTATE_CONS_AND_DES
		#pragma omp atomic
		cons++;
#endif
		m_next = NULL;
		m_item = NULL;
	}


	Node(BoardInfos *m_value, Node *m_next);

	~Node();
	inline Node* next() {
		return m_next;
	}

	inline Node** pointerNext() {
		return &m_next;
	}

	inline BoardInfos *value() {
		return m_item;
	}

	inline void setValue(BoardInfos *val){
		m_item = val;
	}

	inline void setNext(Node *next){
		m_next = next;
	}
};

} /* namespace pcm */
#endif /* NODE_HPP_ */
